package data

import (
	"core/corestruct"
	"core/coreutil"
	"ht/htinfo"
	"reflect"
)

type HtPageAuthDto struct {
	Id int64 `json:"id,string"                         gorm:"column:id;primaryKey;comment:主键;autoIncrement:false;"`

	Code   string `json:"code"         validate:"max=50"   gorm:"column:code;size:50;DEFAULT:'';not null;comment:授权代码;memo:网站Url;"`
	Name   string `json:"name"         validate:"required,max=50"gorm:"column:name;size:50;DEFAULT:'';not null;comment:授权名称;"`
	Memo   string `json:"memo"                             gorm:"column:memo;DEFAULT:'';not null;comment:备注;"`
	Urls   string `json:"urls"                             gorm:"column:urls;DEFAULT:'';not null;comment:Urls;memo:支持*号，多个Url逗号分隔;"`
	P1     string `json:"p1"           validate:"max=50"   gorm:"column:p_1;size:50;DEFAULT:'';not null;comment:参数1;"`
	P2     string `json:"p2"           validate:"max=50"   gorm:"column:p_2;size:50;DEFAULT:'';not null;comment:参数2;"`
	P3     string `json:"p3"           validate:"max=50"   gorm:"column:p_3;size:50;DEFAULT:'';not null;comment:参数3;"`
	P4     string `json:"p4"           validate:"max=50"   gorm:"column:p_4;size:50;DEFAULT:'';not null;comment:参数4;"`
	Sortno int64  `json:"sortno,string"                    gorm:"column:sortno;DEFAULT:0;not null;comment:排序号;"`
}

func (p *HtPageAuthDto) TableName() string {
	return "HtPageAuth"
}
func HtPageAuthDtoInit() {
	var mcls = &HtPageAuthDto{}
	var m = &corestruct.MyClass{
		Name:     "页面授权Dto",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  htinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddDto(m)
}
